|
Foxit PDF SDK
|
Public 成员函数 | |
| def | TagTreeEditor (pdf_doc) |
| 构造函数。 更多... | |
| def | AddNewTag (selected_tag_id, type, title) |
| 向标签树添加一个新标签。 更多... | |
| def | AddTagForAnnotation (is_tag_annotations, annot, page_index, selected_tag_id) |
| 为注释添加标签。 更多... | |
| def | ChangeTagToArtifact (selected_tag_ids, artifact_type, artifact_to_side) |
| 将标签更改为人工元素。 更多... | |
| def | CreateTagFromSelectionByContent (selected_content_ids, selected_tag_id) |
| 根据内容从选中内容创建标签。 更多... | |
| def | CreateTagFromSelectionByElement (page_index, selected_tag_id) |
| 根据元素从选中内容创建标签。 更多... | |
| def | CreateTagFromSelectionByTag (selected_tag_ids, last_selected_tag_id) |
| 根据标签从选中内容创建标签。 更多... | |
| def | CreateTagFromSelectionByText (page_index, selected_text_rects, selected_tag_id) |
| 根据文本从选中内容创建标签。 更多... | |
| def | DeleteEmptyTags (selected_tag_ids) |
| 从标签树中删除空标签。 更多... | |
| def | DeleteTags (selected_tag_ids) |
| 从标签树中删除指定的标签。 更多... | |
| def | FindTagFromSelection (selected_tag_ids) |
| 根据选中内容查找标签。 更多... | |
| def | GetAllContents (selected_tag_id) |
| 获取指定标签项的所有内容。 更多... | |
| def | GetContentTreeItemIDsByTagItemID (selected_tag_id) |
| 根据标签项 ID 获取内容树项 ID。 更多... | |
| def | GetTagPropertyByID (item_id) |
| 根据标签项 ID 获取标签属性。 更多... | |
| def | GetTagTree () |
| 获取当前 PDF 文档的标签树。 更多... | |
| def | GetTagTreeContextMenuItems (input_data) |
| 获取标签树的右键菜单项。 更多... | |
| def | IsEmpty () |
| 检查当前对象是否为空。 更多... | |
| def | MoveTags (source_tag_ids, dest_tag_id, is_moved_as_child) |
| 在标签树中移动标签。 更多... | |
| def | SetDocAsTaggedPDF () |
| 将当前 PDF 文档设置为已标记 PDF。 更多... | |
| def | SetTagPropertyActualText (item_id, actual_text) |
| 为指定标签项设置标签属性的实际文本。 更多... | |
| def | SetTagPropertyAlternateText (item_id, alternate_text) |
| 为指定标签项设置标签属性的替代文本。 更多... | |
| def | SetTagPropertyID (item_id, id) |
| 为指定标签项设置标签属性的 ID。 更多... | |
| def | SetTagPropertyLanguage (item_id, language) |
| 为指定标签项设置标签属性的语言。 更多... | |
| def | SetTagPropertyTitle (item_id, title) |
| 为指定标签项设置标签属性的标题。 更多... | |
| def | SetTagPropertyType (item_id, type) |
| 为指定标签项设置标签属性的类型。 更多... | |
静态 Public 属性 | |
| e_ArtifactAttachToSideTypeBottom = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeBottom | |
| 人工元素附着边:底部。 | |
| e_ArtifactAttachToSideTypeLeft = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeLeft | |
| 人工元素附着边:左侧。 | |
| e_ArtifactAttachToSideTypeNone = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeNone | |
| 人工元素附着边:无。 | |
| e_ArtifactAttachToSideTypeRight = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeRight | |
| 人工元素附着边:右侧。 | |
| e_ArtifactAttachToSideTypeTop = _fsdk.TagTreeEditor_e_ArtifactAttachToSideTypeTop | |
| 人工元素附着边:顶部。 | |
| e_ArtifactTypeLayout = _fsdk.TagTreeEditor_e_ArtifactTypeLayout | |
| 人工元素类型:版式人工元素(视觉版式元素)。 | |
| e_ArtifactTypePage = _fsdk.TagTreeEditor_e_ArtifactTypePage | |
| 人工元素类型:页面级人工元素。 | |
| e_ArtifactTypePagination = _fsdk.TagTreeEditor_e_ArtifactTypePagination | |
| 人工元素类型:与分页相关的人工元素(如页眉/页脚)。 | |
此类用于让用户编辑 PDF 文档的标签树(结构树):查询和修改标签 属性、添加/删除/移动标签、根据选中内容创建标签、将标签更改为人工元素以及 将文档标记为已标记 PDF。 在使用此模块中的任何类或方法之前,请确保已通过 FoxitPDFSDKPython2.Library.Initialize 函数并使用包含 "Accessibility" 模块的密钥成功初始化福昕 PDF SDK。
| def FoxitPDFSDKPython2.TagTreeEditor.TagTreeEditor | ( | pdf_doc | ) |
构造函数。
构造函数,使用另一个标签编辑器对象构造。
| [in] | pdf_doc | 有效的 PDF 文档对象。 |
| [in] | other | 另一个标签编辑器对象。 |
| def FoxitPDFSDKPython2.TagTreeEditor.AddNewTag | ( | selected_tag_id, | |
| type, | |||
| title | |||
| ) |
向标签树添加一个新标签。
| [in] | selected_tag_id | 作为父级的已选中标签 ID。 |
| [in] | type | 标签类型。 |
| [in] | title | 标签标题。 |
| def FoxitPDFSDKPython2.TagTreeEditor.AddTagForAnnotation | ( | is_tag_annotations, | |
| annot, | |||
| page_index, | |||
| selected_tag_id | |||
| ) |
为注释添加标签。
| [in] | is_tag_annotations | 是否为注释添加标签。 |
| [in] | annot | 注释对象。 |
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 FoxitPDFSDKPython2.PDFDoc.GetPageCount 返回的页面总数。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.ChangeTagToArtifact | ( | selected_tag_ids, | |
| artifact_type, | |||
| artifact_to_side | |||
| ) |
将标签更改为人工元素。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| [in] | artifact_type | 人工元素类型。请参考 。 |
| [in] | artifact_to_side | 人工元素附着边类型。 请参考 。 |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByContent | ( | selected_content_ids, | |
| selected_tag_id | |||
| ) |
根据内容从选中内容创建标签。
| [in] | selected_content_ids | 已选中的内容 ID 集合。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByElement | ( | page_index, | |
| selected_tag_id | |||
| ) |
根据元素从选中内容创建标签。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 FoxitPDFSDKPython2.PDFDoc.GetPageCount 返回的页面总数。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByTag | ( | selected_tag_ids, | |
| last_selected_tag_id | |||
| ) |
根据标签从选中内容创建标签。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| [in] | last_selected_tag_id | 最后一个被选中的标签 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.CreateTagFromSelectionByText | ( | page_index, | |
| selected_text_rects, | |||
| selected_tag_id | |||
| ) |
根据文本从选中内容创建标签。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 FoxitPDFSDKPython2.PDFDoc.GetPageCount 返回的页面总数。 |
| [in] | selected_text_rects | 已选中文本的矩形集合。 |
| [in] | selected_tag_id | 已选中的标签 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.DeleteEmptyTags | ( | selected_tag_ids | ) |
从标签树中删除空标签。
| [in] | selected_tag_ids | 用于检查空标签的标签 ID 数组。 |
| def FoxitPDFSDKPython2.TagTreeEditor.DeleteTags | ( | selected_tag_ids | ) |
从标签树中删除指定的标签。
| [in] | selected_tag_ids | 待删除标签 ID 的数组。 |
| def FoxitPDFSDKPython2.TagTreeEditor.FindTagFromSelection | ( | selected_tag_ids | ) |
根据选中内容查找标签。
| [in] | selected_tag_ids | 已选中的标签 ID 集合。 |
| def FoxitPDFSDKPython2.TagTreeEditor.GetAllContents | ( | selected_tag_id | ) |
获取指定标签项的所有内容。
| [in] | selected_tag_id | 已选中的标签 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.GetContentTreeItemIDsByTagItemID | ( | selected_tag_id | ) |
根据标签项 ID 获取内容树项 ID。
| [in] | selected_tag_id | 已选中的标签 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.GetTagPropertyByID | ( | item_id | ) |
根据标签项 ID 获取标签属性。
| [in] | item_id | 标签项 ID,通过 FoxitPDFSDKPython2.TagTreeEditor.GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| def FoxitPDFSDKPython2.TagTreeEditor.GetTagTree | ( | ) |
获取当前 PDF 文档的标签树。
| def FoxitPDFSDKPython2.TagTreeEditor.GetTagTreeContextMenuItems | ( | input_data | ) |
获取标签树的右键菜单项。
| [in] | input_data | 右键菜单的输入数据。 |
| def FoxitPDFSDKPython2.TagTreeEditor.IsEmpty | ( | ) |
检查当前对象是否为空。
当前对象为空时,表示当前对象不可用。
| def FoxitPDFSDKPython2.TagTreeEditor.MoveTags | ( | source_tag_ids, | |
| dest_tag_id, | |||
| is_moved_as_child | |||
| ) |
在标签树中移动标签。
| [in] | dest_tag_id | 目标标签 ID。 |
| [in] | is_moved_as_child | 是否作为目标的子项移动。 |
| def FoxitPDFSDKPython2.TagTreeEditor.SetDocAsTaggedPDF | ( | ) |
将当前 PDF 文档设置为已标记 PDF。
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyActualText | ( | item_id, | |
| actual_text | |||
| ) |
为指定标签项设置标签属性的实际文本。
| [in] | item_id | 标签项 ID,通过 FoxitPDFSDKPython2.TagTreeEditor.GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | actual_text | 要设置的实际文本。 |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyAlternateText | ( | item_id, | |
| alternate_text | |||
| ) |
为指定标签项设置标签属性的替代文本。
| [in] | item_id | 标签项 ID,通过 FoxitPDFSDKPython2.TagTreeEditor.GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | alternate_text | 要设置的替代文本。 |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyID | ( | item_id, | |
| id | |||
| ) |
为指定标签项设置标签属性的 ID。
| [in] | item_id | 标签项 ID,通过 FoxitPDFSDKPython2.TagTreeEditor.GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | id | 要设置的 ID。 |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyLanguage | ( | item_id, | |
| language | |||
| ) |
为指定标签项设置标签属性的语言。
| [in] | item_id | 标签项 ID,通过 FoxitPDFSDKPython2.TagTreeEditor.GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | language | 要设置的语言。 |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyTitle | ( | item_id, | |
| title | |||
| ) |
为指定标签项设置标签属性的标题。
| [in] | item_id | 标签项 ID,通过 FoxitPDFSDKPython2.TagTreeEditor.GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | title | 要设置的标签标题。 |
| def FoxitPDFSDKPython2.TagTreeEditor.SetTagPropertyType | ( | item_id, | |
| type | |||
| ) |
为指定标签项设置标签属性的类型。
| [in] | item_id | 标签项 ID,通过 FoxitPDFSDKPython2.TagTreeEditor.GetTagTree 返回的条目中的 TagTreeItemData::item_id 获取。 |
| [in] | type | 要设置的标签类型。 |